---
title: Schema registration via the Rover CLI
sidebar_title: Using the Rover CLI
---

import ProjectConfigPanel from "gatsby-theme-apollo-docs/shared/project-config-panel.mdx";
import RegisterCli from '../../shared/register-cli.mdx';
import RegisterFederatedCli from '../../shared/register-federated-cli.mdx'

If you're using a GraphQL server that doesn't support [schema reporting](./schema-reporting/), you can register your schema via the [Rover CLI](https://www.apollographql.com/docs/rover/).

> **Do not use both schema reporting and Rover to register schemas for the same graph.** Doing so can cause you to register "no-op" schema changes that are semantically identical but cosmetically different.

## Registering a non-federated schema

<RegisterCli />

## Registering federated schemas

See [Setting up managed federation](https://www.apollographql.com/docs/federation/managed-federation/setup/).

## Registering with continuous delivery

To get the most out of Studio, you should **register each update to your production schema as soon as it occurs**. Consequently, schema registration should be part of your continuous delivery pipeline.

Here's a sample continuous delivery configuration for CLI-based schema registration using CircleCI:

```yaml{13,29-31}
version: 2

jobs:
  build:
    docker:
      - image: circleci/node:8

    steps:
      - checkout

      - run: npm install
      
      - run:
          name: Install Rover
          command: |
            # download and install Rover
            curl -sSL https://rover.apollo.dev/nix/v0.3.0 | sh
            
            # This allows the PATH changes to persist to the next `run` step
            echo 'export PATH=$HOME/.rover/bin:$PATH' >> $BASH_ENV

      # Start the GraphQL server.  If a different command is used to
      # start the server, use it in place of `npm start` here.
      - run:
          name: Starting server
          command: npm start
          background: true

      # make sure the server has enough time to start up before running
      # commands against it
      - run: sleep 5

      # When running on the 'main' branch, push the latest version
      # of the schema to Apollo Studio.
      - run: |
          if [ "${CIRCLE_BRANCH}" == "main" ]; then
            rover graph publish my-graph@my-variant --schema ./schema.graphql
          fi
```
